package com.framework.modules.sys.controller;


import com.framework.exception.util.RespResult;
import com.framework.page.PageUtils;
import com.framework.service.ActiveAgentService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 活动相关
 * @author wq
 */
@RestController
@RequestMapping("/sys/activeagent")
public class SysActiveAgentController extends AbstractController {
    @Autowired
    private ActiveAgentService activeAgentService;

    /**
     * 活动详情
     * @param params
     * @return
     */
    @RequestMapping("/list")
    @RequiresPermissions("sys:sysactive:list")
    public RespResult list(@RequestParam Map<String,Object> params){

        PageUtils page = activeAgentService.queryHistoryList(params);
        return RespResult.ok().put("page",page);
    }
}
